/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package afroschool.beans;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author AUTRES
 */
@Entity
@Table(name = "options")
@NamedQueries({@NamedQuery(name = "Options.findById", query = "SELECT o FROM Options o WHERE o.id = :id"), @NamedQuery(name = "Options.findByEtacode", query = "SELECT o FROM Options o WHERE o.etacode = :etacode"), @NamedQuery(name = "Options.findByCode", query = "SELECT o FROM Options o WHERE o.code = :code"), @NamedQuery(name = "Options.findByIntitule", query = "SELECT o FROM Options o WHERE o.intitule = :intitule")})
public class Options implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "id", nullable = false)
    private Integer id;
    @Column(name = "Eta_code")
    private String etacode;
    @Column(name = "code")
    private String code;
    @Column(name = "intitule")
    private String intitule;

    public Options() {
    }

    public Options(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEtacode() {
        return etacode;
    }

    public void setEtacode(String etacode) {
        this.etacode = etacode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getIntitule() {
        return intitule;
    }

    public void setIntitule(String intitule) {
        this.intitule = intitule;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Options)) {
            return false;
        }
        Options other = (Options) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "afroschool.beans.Options[id=" + id + "]";
    }

}
